# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookRuntimeTemplate do
  @moduledoc """
  A template that specifies runtime configurations such as machine type, runtime version, network configurations, etc. Multiple runtimes can be created from a runtime template.

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this NotebookRuntimeTemplate was created.
  *   `dataPersistentDiskSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PersistentDiskSpec.t`, *default:* `nil`) - Optional. The specification of persistent disk attached to the runtime as data disk storage.
  *   `description` (*type:* `String.t`, *default:* `nil`) - The description of the NotebookRuntimeTemplate.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The display name of the NotebookRuntimeTemplate. The name can be up to 128 characters long and can consist of any UTF-8 characters.
  *   `encryptionSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EncryptionSpec.t`, *default:* `nil`) - Customer-managed encryption key spec for the notebook runtime.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
  *   `eucConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookEucConfig.t`, *default:* `nil`) - EUC configuration of the NotebookRuntimeTemplate.
  *   `idleShutdownConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookIdleShutdownConfig.t`, *default:* `nil`) - The idle shutdown configuration of NotebookRuntimeTemplate. This config will only be set when idle shutdown is enabled.
  *   `isDefault` (*type:* `boolean()`, *default:* `nil`) - Output only. Deprecated: This field has no behavior. Use notebook_runtime_type = 'ONE_CLICK' instead. The default template to use if not specified.
  *   `labels` (*type:* `map()`, *default:* `nil`) - The labels with user-defined metadata to organize the NotebookRuntimeTemplates. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
  *   `machineSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MachineSpec.t`, *default:* `nil`) - Optional. Immutable. The specification of a single machine for the template.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the NotebookRuntimeTemplate.
  *   `networkSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NetworkSpec.t`, *default:* `nil`) - Optional. Network spec.
  *   `networkTags` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).
  *   `notebookRuntimeType` (*type:* `String.t`, *default:* `nil`) - Optional. Immutable. The type of the notebook runtime template.
  *   `serviceAccount` (*type:* `String.t`, *default:* `nil`) - Deprecated: This field is ignored and the "Vertex AI Notebook Service Account" (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is used for the runtime workload identity. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account for more details. For NotebookExecutionJob, use NotebookExecutionJob.service_account instead. The service account that the runtime workload runs as. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.
  *   `shieldedVmConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ShieldedVmConfig.t`, *default:* `nil`) - Optional. Immutable. Runtime Shielded VM spec.
  *   `softwareConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookSoftwareConfig.t`, *default:* `nil`) - Optional. The notebook software configuration of the notebook runtime.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this NotebookRuntimeTemplate was most recently updated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :dataPersistentDiskSpec =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PersistentDiskSpec.t() | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :encryptionSpec =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EncryptionSpec.t() | nil,
          :etag => String.t() | nil,
          :eucConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookEucConfig.t() | nil,
          :idleShutdownConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookIdleShutdownConfig.t()
            | nil,
          :isDefault => boolean() | nil,
          :labels => map() | nil,
          :machineSpec =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MachineSpec.t() | nil,
          :name => String.t() | nil,
          :networkSpec =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NetworkSpec.t() | nil,
          :networkTags => list(String.t()) | nil,
          :notebookRuntimeType => String.t() | nil,
          :serviceAccount => String.t() | nil,
          :shieldedVmConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ShieldedVmConfig.t() | nil,
          :softwareConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookSoftwareConfig.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:createTime, as: DateTime)

  field(:dataPersistentDiskSpec,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PersistentDiskSpec
  )

  field(:description)
  field(:displayName)
  field(:encryptionSpec, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EncryptionSpec)
  field(:etag)
  field(:eucConfig, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookEucConfig)

  field(:idleShutdownConfig,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookIdleShutdownConfig
  )

  field(:isDefault)
  field(:labels, type: :map)
  field(:machineSpec, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MachineSpec)
  field(:name)
  field(:networkSpec, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NetworkSpec)
  field(:networkTags, type: :list)
  field(:notebookRuntimeType)
  field(:serviceAccount)

  field(:shieldedVmConfig,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ShieldedVmConfig
  )

  field(:softwareConfig,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookSoftwareConfig
  )

  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookRuntimeTemplate do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookRuntimeTemplate.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1NotebookRuntimeTemplate do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
